FROM xiaobu191/php-7.4.33-cli-bullseye

SHELL ["/bin/bash", "-cex"]

WORKDIR /root

COPY pm2-install.sh *.php *.js *.json ./

# https://blog.csdn.net/qq_41980563/article/details/88876874
RUN apt-get update; \
    apt-get install -y --no-install-recommends \
            procps \
    ; \
    rm -rf /var/lib/apt/lists/*

RUN chmod +x ./pm2-install.sh && ./pm2-install.sh

CMD ["pm2-runtime", "start", "apps.json"]